Cosmic dust particles effectively attenuate starlight. Their absorption ofstarlight produces emission spectra from the near- to far-infrared, whichdepends on the sizes and properties of the dust grains, and spectrum of theheating radiation field. The near- to mid-infrared is dominated by theemissions by very small grains. Modeling the absorption of starlight by theseparticles is, however, computationally expensive and a significant bottleneckfor self-consistent radiation transport codes treating the heating of dust bystars. In this paper, we summarize the formalism for computing the stochasticemissivity of cosmic dust, which was developed in earlier works, and present anew library HEATCODE implementing this formalism for the calculation forarbitrary grain properties and heating radiation fields. Our library is highlyoptimized for general-purpose processors with multiple cores and vectorinstructions, with hierarchical memory cache structure. The HEATCODE libraryalso efficiently runs on co-processor cards implementing the Intel ManyIntegrated Core (Intel MIC) architecture. We discuss in detail the optimizationsteps that we took in order to optimize for the Intel MIC architecture, whichalso significantly benefited the performance of the code on general-purposeprocessors, and provide code samples and performance benchmarks for each step.The HEATCODE library performance on a single Intel Xeon Phi coprocessor (IntelMIC architecture) is approximately 2 times a general-purpose two-socketmulticore processor system with approximately the same nominal powerconsumption. The library supports heterogeneous calculations employing hostprocessors simultaneously with multiple coprocessors, and can be easilyincorporated into existing radiation transport codes.
展开▼